<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<script src="resources/file-drag-common.js"></script>
<form method="GET" onsubmit="finish(false)">
<input type="file" oninvalid="finish(true)" required>
<input type="reset">
<input type="submit">
</form>
<pre id="console"></pre>
<script>
description("This tests that a reset file input with a required value doesn't validate.");

var invalid = false;
function finish(pass)
{
    invalid = pass;
    shouldBeTrue("invalid");
    finishJSTest();
}

function startTest()
{
    dragFilesOntoInput(document.forms[0].querySelector("[type=file]"), ['file-input-reset-validation.html']);
    document.forms[0].querySelector("[type=reset]").click();
    document.forms[0].querySelector("[type=submit]").click();
}

if (window.eventSender) {
    window.jsTestIsAsync = true;
    testRunner.dumpAsText();
    window.onload = startTest;
}
</script>
